package com.stylefeng.guns.modular.pay.model;

import java.util.Date;

import javax.validation.constraints.NotEmpty;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import springfox.documentation.annotations.ApiIgnore;

import java.io.Serializable;

/**
 * <p>
 * 银行卡
 * </p>
 *
 * @author stylefeng
 * @since 2018-09-26
 */
@TableName("api_card")
public class Card extends Model<Card> {

    private static final long serialVersionUID = 1L;

    private Integer id;
    /**
     * 账户名
     */
    @TableField("account_name")
    private String accountName;
    /**
     * 银行卡名称
     */
    @TableField("bank_name")
    private String bankName;
    /**
     * 银行编号
     */
    @TableField("bank_id")
    private Integer bankId;
    /**
     * 卡号
     */
    @TableField("card_no")
    private String cardNo;
    /**
     * 绑定手机
     */
    private String phone;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;

    /**
     * 会员
     */
    @TableField("member_id")
    private Integer memberId;
    
    
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    @NotEmpty(message="accountName不能为空")
    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }
    @NotEmpty(message="bankName不能为空")
    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public Integer getBankId() {
        return bankId;
    }

    public void setBankId(Integer bankId) {
        this.bankId = bankId;
    }
    @NotEmpty(message="cardNo不能为空")
    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }
    @NotEmpty(message="phone不能为空")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @NotEmpty(message="memberId不能为空")
    public Integer getMemberId() {
		return memberId;
	}

	public void setMemberId(Integer memberId) {
		this.memberId = memberId;
	}

	@Override
    public String toString() {
        return "ApiCard{" +
        "id=" + id +
        ", accountName=" + accountName +
        ", bankName=" + bankName +
        ", bankCode=" + bankId +
        ", cardNo=" + cardNo +
        ", phone=" + phone +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
